The present technology relates to a processing apparatus, a processing method, and a program. More specifically, the present technology relates to a processing apparatus, a processing method, and a program capable of realizing rapid and accurate autofocus while also allowing camera shake correction to function as much as possible as, for example.
For example, in a digital (still) camera such as a compact camera, a mirrorless camera, and a single-lens reflex camera, examples of autofocus (hereinafter also referred to as “AF”) that automatically sets the focus state to an in-focus state include a contrast method and a phase difference method.
In a contrast method, focus control for driving a focus lens is performed so that the contrast of an image captured by the digital camera is at a maximum.
In such a contrast method, since the contrast of the image used in focus control can be obtained from the image captured by the digital camera, a special mechanism is not used.
However, in a contrast method, the image is captured while moving the focus lens. Since the contrast of that image is necessary to be detected, it takes a comparatively longer time to set the focus state to an in-focus state.
In a phase difference method, based on phase difference information representing a phase difference (phase interval) between a first image formed by, for example, light (object light) from an object that has passed through a first edge portion of an exit pupil in the digital camera's optical system and a second image formed by, for example, object light that has passed through a second edge portion opposite from the first edge portion across the optical axis of the optical system, focus control that drives the focus lens is performed so that the phase difference of an image (phase difference between the first image and the second image) matches the phase difference during an in-focus state.
In such a phase difference method, since the direction and the magnitude (amount) for driving the focus lens can be recognized from the phase difference of the image (the phase difference between the first image and the second image), the focus state can be rapidly set to an in-focus state.
However, in a phase difference method, special mechanisms are used, namely, a dedicated sensor, which is different to the image sensor for capturing the image, that receives object light that has passed through the first and the second edge portions, respectively, of the exit pupil, and a mechanism that splits off object light that has passed through the first and the second edge portions, respectively, of the exit pupil to the dedicated sensor.
Thus, since a contrast method does not use a special mechanism, a contrast method is widely employed in compact cameras and mirrorless cameras for which there is a strong demand for compactness.
On the other hand, although a phase difference method can rapidly set the focus state to an in-focus state, a phase difference method uses special mechanisms, and thus compactness is difficult to achieve. Therefore, a phase difference method is often used in single-lens reflex cameras.
However, as described above, a phase difference method can perform rapid AF (quickly setting the focus state to an in-focus state). Therefore, there is a strong demand to use a phase difference method in compact cameras and mirrorless cameras.
Accordingly, for example, Japanese Patent No. 3592147 proposes a phase difference method that employs an image sensor that includes phase difference pixels, which are for detecting the phase difference of the image, as some of the pixels, and detects phase difference information representing a phase difference of the image from the pixel value of the phase difference pixels included in the image sensor.
In the phase difference method described in Japanese Patent No. 3592147, the image sensor includes a predetermined number of sets of phase difference pixels for receiving object light that has passed through a first edge portion of an exit pupil and phase difference pixels for receiving object light that has passed through a second edge portion. Based on the pixel value of the phase difference pixels included in the image sensor, the phase difference information is detected.
Thus, in a phase difference method using an image sensor that includes phase difference pixels as some of its pixels, a special mechanism such as a dedicated sensor does not need to be used, so that the digital camera can be made compact.
Further, digital cameras usually have a camera shake correction function for performing camera shake correction by changing the relative positional relationship in the direction perpendicular to the optical axis between the image sensor and the optical system.
When camera shake correction is ON (is functioning), an error is produced in the phase difference information detected from the pixel value of the phase difference pixels, namely, in the defocus amount representing the degree of out-of-focus, due to fluctuations in the distribution of the amount of object light received by the phase difference pixels caused by changes in the relative positional relationship in the direction perpendicular to the optical axis between the image sensor and the optical system.
Further, when an error is produced in the phase difference information (defocus amount), the accuracy of the phase difference method AF, in which focus control is performed based on that phase difference information, deteriorates.
Accordingly, JP-A-2011-081201 proposes a technology for performing phase difference method-based AF by, based on optical information from the imaging lens, determining whether shading (vignetting) is produced in the phase difference pixels by the camera shake correction, and switching off (stopping) camera shake correction when shading is produced in the phase difference pixels.